<template>
  <div class="header">{{msg}}</div>
</template>

<script>
import { ref, onMounted } from 'vue'
import http from 'http/index'
import { useStore } from 'vuex'
export default {
  setup(props, context) {
    let msg = ref('模板')
    const store = useStore()
    onMounted(()=> {
      // console.log(store.state.user.token)
      // mock
      http.createUser().then(res=> {
        console.log(res)
      })
    })

    return {
      msg
    }

  },
}
</script>

<style scoped lang='scss'>
$red: red;
.header {
  color: $red
}
</style>